-
Notifications
You must be signed in to change notification settings - Fork 2.4k
chore(build):add vscode devcontainer config #2466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(build):add vscode devcontainer config #2466
Conversation
hi, @geebytes thanks for your contribution, can you describe how to use this feature? |
|
Hi @geebytes. Thanks for your PR. But I encountered some problems. My development system is Ubuntu 24.04. The configuration will report an error: [2025-03-15T13:08:41.919Z] Stop (4 ms): Setup shutdown monitor
[2025-03-15T13:08:41.920Z] Start: Run in container: test -d '/home/work/.vscode-server'
[2025-03-15T13:08:41.920Z]
[2025-03-15T13:08:41.920Z]
[2025-03-15T13:08:41.920Z] Exit code 1
[2025-03-15T13:08:41.920Z] Stop (0 ms): Run in container: test -d '/home/work/.vscode-server'
[2025-03-15T13:08:41.920Z] Start: Run in container: test -d '/home/work/.vscode-remote'
[2025-03-15T13:08:41.920Z]
[2025-03-15T13:08:41.920Z]
[2025-03-15T13:08:41.920Z] Exit code 1
[2025-03-15T13:08:41.920Z] Stop (0 ms): Run in container: test -d '/home/work/.vscode-remote'
[2025-03-15T13:08:41.921Z] Start: Run in container: test ! -f '/home/work/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/work/.vscode-server/data/Machine' && { > '/home/work/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2025-03-15T13:08:41.921Z]
[2025-03-15T13:08:41.921Z] mkdir: cannot create directory ‘/home/work’: Permission denied
[2025-03-15T13:08:41.921Z] Exit code 1
[2025-03-15T13:08:41.921Z] Stop (0 ms): Run in container: test ! -f '/home/work/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/work/.vscode-server/data/Machine' && { > '/home/work/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2025-03-15T13:08:41.921Z] Start: Run in container: cat /home/work/.vscode-server/data/Machine/settings.json
[2025-03-15T13:08:41.922Z]
[2025-03-15T13:08:41.922Z] cat: /home/work/.vscode-server/data/Machine/settings.json: Permission denied
[2025-03-15T13:08:41.922Z] Exit code 1
[2025-03-15T13:08:41.922Z] Stop (1 ms): Run in container: cat /home/work/.vscode-server/data/Machine/settings.json
[2025-03-15T13:08:41.922Z] Start: Run in container: test -d '/home/work/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.922Z]
[2025-03-15T13:08:41.922Z]
[2025-03-15T13:08:41.922Z] Exit code 1
[2025-03-15T13:08:41.922Z] Stop (0 ms): Run in container: test -d '/home/work/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.922Z] Start: Run in container: test -d '/vscode/vscode-server/bin/linux-x64/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.923Z]
[2025-03-15T13:08:41.923Z]
[2025-03-15T13:08:41.923Z] Stop (1 ms): Run in container: test -d '/vscode/vscode-server/bin/linux-x64/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.923Z] Start: Run in container: mkdir -p '/home/work/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/e54c774e0add60467559eb0d1e229c6452cf8447' '/home/work/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.923Z]
[2025-03-15T13:08:41.923Z] mkdir: cannot create directory ‘/home/work’: Permission denied
[2025-03-15T13:08:41.923Z] Exit code 1
[2025-03-15T13:08:41.923Z] Stop (0 ms): Run in container: mkdir -p '/home/work/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/e54c774e0add60467559eb0d1e229c6452cf8447' '/home/work/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.925Z] Command in container failed: mkdir -p '/home/work/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/e54c774e0add60467559eb0d1e229c6452cf8447' '/home/work/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447'
[2025-03-15T13:08:41.926Z] mkdir: cannot create directory ‘/home/work’: Permission denied
[2025-03-15T13:08:41.926Z] Exit code 1
And the default python version is 3.11 in docker image
|
b2271db
to
d1d53de
Compare
chore(build):Optimize the zsh setup fix(dev):Load .env on demand fix(dev):install oh-my-zsh from mirror
3d28de1
to
599ebff
Compare
@Aries-ckt @fangyinc hi,I’ve squashed the bugs and made the logic way more flexible now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you for your contribution, using Dev Container in DB-GPT is super cool, I really love it, thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for your contribution
Description
Compatible with Linux and Windows Subsystem for Linux (WSL) environments only.
Add VS Code devcontainer development environment configuration
Use VS Code's Dev Container extension to build a containerized development environment. Leverage the
eosphorosai/dbgpt:latest
image as the development environment to avoid repeated dependency installations and improve development efficiency.Follow the guide Developing inside a Container to set up the Dev Container:
Ctrl+Shift+P
to open the command palette, then enterDev Containers: Open Folder in Container
.Set git ssh sharing-git-credentials
Before the first launch, please execute the .devcontainer/init_env.sh script in the project root directory in host.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Snapshots:
Include snapshots for easier review.
Checklist: